#include "LayoutWriter.h"


LayoutWriter::LayoutWriter(IncidenceGraph &g)
	: graph(g)
{
}


LayoutWriter::~LayoutWriter()
{
}


bool LayoutWriter::Write(String fileName)
{
	Ofstream ofs(fileName, Ofstream::out);

	auto vertices = graph.GetVertices();
	for (auto it = vertices.begin(); it != vertices.end(); it++) {
		ofs << it->i << L"\t" << it->x << L"\t" << it->y << endl;
	}
	return true;
}